package com.huabo.contract.mysql.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.*;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.ORDER;


/**
 * <p>
 * 合同范本
 * </p>
 *
 * @author huabo
 * @since 2021-10-23
 */
@Data
@NoArgsConstructor
@Table(name = "TBL_CYHW_UNIT")
@ApiModel(value="TblCyhwUnit对象", description="")
public class TblCyhwUnitMySql implements Serializable {
//收款合同、合同名称
    private static final long serialVersionUID = 1L;

      @ApiModelProperty(value = "合同主键自增")
      @TableId("CONTRACTID")
      @Id
      //@GeneratedValue(strategy = GenerationType.IDENTITY,generator = "select HIBERNATE_SEQUENCE.nextval from dual")
      @KeySql(sql = "select HIBERNATE_SEQUENCE.nextval from dual", order= ORDER.DEFAULT)
      private BigDecimal contractid;

      @ApiModelProperty(value = "隶属流程id 关联Tbl_flow flowid")
      @TableField("FLOWID")
     private BigDecimal flowid;

      @ApiModelProperty(value = "单位名称")
      @TableField("UNITNAME")
      @Column(name = "UNITNAME")
    private String unitname;

      @ApiModelProperty(value = "合同名称")
      @TableField("CONTRACTNAME")
      @Column(name = "CONTRACTNAME")
    private String contractname;

      @ApiModelProperty(value = "合同编号")
      @TableField("CONTRACTNO")
      @Column(name = "CONTRACTNO")
    private String contractno;

      @ApiModelProperty(value = "承办部门")
      @TableField("CONTRACTDEPT")
      @Column(name = "CONTRACTDEPT")
    private BigDecimal contractdept;

      @ApiModelProperty(value = "合同对方")
      @TableField("CONTRACTLINK")
    private String contractlink;

      @ApiModelProperty(value = "合同金额")
      @TableField("CONTRACTMONEY")
    private BigDecimal contractmoney;

      @ApiModelProperty(value = "合同状态 1-审批中、2-需调整、3-已通过、4-已终止、5-已跟踪、6-已完成、7-执行中、		8-已归档、		9-已暂停、		10-已变更、		11-已终止、		12-纠纷中、		13-协商中、		14-诉讼中、		15-仲裁中、		16-已结案")
      @TableField("CONTRACTSTATUS")
    private Integer contractstatus;

      @ApiModelProperty(value = "关联科室")
      @TableField("LINKDEPT")
    private String linkdept;

      @ApiModelProperty(value = "隶属组织")
      @TableField("ORGID")
    private BigDecimal orgid;

      @ApiModelProperty(value = "创建人")
      @TableField("CREATEUSER")
    private BigDecimal createuser;

      @ApiModelProperty(value = "创建时间")
      @TableField("CREATETIME")
      @JSONField(format = "yyyy-MM-dd")
      @DateTimeFormat(pattern="yyyy-MM-dd")
      private Date createtime;

      @ApiModelProperty(value = "合同简要说明")
      @TableField("MOMOCONCAT")
    private String momoconcat;

      @ApiModelProperty(value = "关联的风险控制")
      @TableField("RISKCONTROL")
    private String riskcontrol;

      @ApiModelProperty(value = "合同内容")
      @TableField("DESCRIBE")
    private String describe;

      @ApiModelProperty(value = "承办人")
      @TableField("CONTRACTSTAFF")
    private BigDecimal contractstaff;

      @ApiModelProperty(value = "保密等级")
      @TableField("SCRILEVEL")
    private String scrilevel;

      @ApiModelProperty(value = "合同开始时间")
      @TableField("STARTDATE")
      @JSONField(format = "yyyy-MM-dd")
      @DateTimeFormat(pattern="yyyy-MM-dd")
      private Date startdate;

      @ApiModelProperty(value = "合同结束时间")
      @TableField("ENDDATE")
      @JSONField(format = "yyyy-MM-dd")
      @DateTimeFormat(pattern="yyyy-MM-dd")
      private Date enddate;

      @ApiModelProperty(value = "合同项目")
      @TableField("CONTRACTITEM")
    private String contractitem;

      @ApiModelProperty(value = "合同类型")
      @TableField("CONTRACTTYPE")
    private String contracttype;

      @ApiModelProperty(value = "合同期限类型")
      @TableField("CONTRACTDATETYPE")
    private String contractdatetype;

      @ApiModelProperty(value = "合同性质")
      @TableField("CONTRACTXZ")
    private String contractxz;

      @ApiModelProperty(value = "合同相对方主键ID")
      @TableField("CONTRACTXDFXINFO")
    private BigDecimal contractxdfxinfo;

      @ApiModelProperty(value = "合同类型 HTGL001 - 相对方、HTGL002-合同订立、HTGL003-合同用印、HTGL004-合同履行、HTGL005-变更、HTGL006-合同归档、HTGL007-合同范本")
      @TableField("RECORDTYPE")
    private String recordtype;

      @ApiModelProperty(value = "隶属合同 cyhwunitId")
      @TableField("RECORDPARENT")
    private BigDecimal recordparent;

      @ApiModelProperty(value = "合同金额汉字描述")
      @TableField("HZSUMOWING")
    private String hzsumowing;

      @ApiModelProperty(value = "计价方式")
      @TableField("JIJIATYPE")
    private String jijiatype;

      @ApiModelProperty(value = "币种")
      @TableField("MONEYTYPE")
    private String moneytype;

      @ApiModelProperty(value = "首付方向")
      @TableField("DCTYPE")
    private String dctype;

      @ApiModelProperty(value = "合同标的")
      @TableField("CONTRACTBD")
    private String contractbd;

      @ApiModelProperty(value = "是否重大合同")
      @TableField("CONTRACTZD")
    private String contractzd;

      @ApiModelProperty(value = "经办人")
      @TableField("JBSTAFF")
    private BigDecimal jbstaff;

      @ApiModelProperty(value = "经办部门")
      @TableField("JBDEPT")
    private BigDecimal jbdept;

      @ApiModelProperty(value = "经办公司")
      @TableField("JBUNIT")
    private BigDecimal jbunit;

      @ApiModelProperty(value = "执行公司")
      @TableField("ZXUNIT")
    private BigDecimal zxunit;

      @ApiModelProperty(value = "是否关联主合同")
      @TableField("CONTRACTCHILDREN")
    private String contractchildren;

      @ApiModelProperty(value = "是否有履行计划")
      @TableField("CONTRACTPLAN")
    private String contractplan;

      @ApiModelProperty(value = "合同立项信息")
      @TableField("TOPICID")
    private String topicid;

      @ApiModelProperty(value = "合同立项名称")
      @TableField("TOPICNAME")
    private String topicname;

      @ApiModelProperty(value = "历史状态")
      @TableField("HISCONTRACTSTATUS")
    private BigDecimal hiscontractstatus;

      @ApiModelProperty(value = "变更类型")
      @TableField("CHANGETYPE")
    private String changetype;

      @ApiModelProperty(value = "变更时间")
      @TableField("CHANGEDATE")
      @JSONField(format = "yyyy-MM-dd HH:mm:ss")
      @DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss" )
      private Date changedate;

      @ApiModelProperty(value = "变更内容")
      @TableField("CHANGEDESC")
    private String changedesc;
    @ApiModelProperty(value = "银行账号ID")
    @TableField("COUNTERPARTBANK")
    private BigDecimal counterpartbank;

    @Transient//已付款金额//开票金额TblContractPayment
    private BigDecimal paymenmoney;

    @Transient
    private BigDecimal budgetid;
    @Transient//TblCyhwProjectbudget
    private String counterpartno;//相对方编号
    @Transient
    private String totaltmoney;//注册资本
    @Transient
    private String projectstagegoal;//法定代表人姓名
    @Transient
    private String counterpartaddress;//相对方地址
    @Transient
    private String counterpartphone;//相对方电话
    @Transient
    private String counterpartcode;//邮编
    @Transient
    private String counterparthank;
    @Transient
    private Integer inspectionstatus;
    @Transient
    private Integer plannum;
    @Transient
    private String orgmeno;
    @Transient
    private String budgetname;//付款单位
    @Transient
    private String counterparttype;//相对方类型
    @Transient
    private String orgname;
    @Transient
    private String parentname;
    @Transient
    private String bankid;
    @Transient
    private String bankaccount;

      //查询条件
    @Transient
    private BigDecimal minMoney;
    @Transient
    private BigDecimal maxMoney;
    @Transient
    private String choicejbunitid;//经办部门
    @Transient
    private String choicecontractDeptId;//执行部门
    @Transient
    private String recordConcatname;//相对方信息名称
    @Transient
    private Integer yongyinnum;
    @Transient
    private Date yongyintime;
    @Transient
    private String topic;//立项Name
    @Transient
    private Integer nodeCount;//经办人需要执行的任务量
    @Transient//TblContractPlannode未付款金额
    private BigDecimal nodemoney;

    @Transient
    @ApiModelProperty(value = "父级信息")
    private TblCyhwProjectbudgetMySql parentBudget;
    @Transient
    @ApiModelProperty(value = "隶属流程")
    private TblFlowMySql flowInfo;

    @Transient
    @ApiModelProperty(value = "银行账号对象")
    private TblCounterpartBankinfoMySql bankinfo;

    @Transient
    @TableField("合同签署文件列表信息")
    private List<TblContractAppendixsigningMySql> signList = new ArrayList<TblContractAppendixsigningMySql>(0);

    @Transient
    @TableField("合同履行阶段")
    private List<TblContractPlannodeMySql> planNodeList = new ArrayList(0);

    @JSONField( serialize = false)

    @Transient
    private TblFlowMySql flow;

    //映射TblStaff
    @Transient
    private BigDecimal staffid;//主键ID,自动增长
    @Transient
    private String realname;//真实名字
    @Transient
    private String fixedphone;//固定电话
    @Transient
    private String address;//地址
    @Transient
    private String email;//邮箱
    @Transient
    private String miblephone;//手机号码
    @Transient
    private String memo;//备注
    @Transient
    private String username;//用户名（登录名）
    @Transient
    private String password;//密码
    @Transient
    private BigDecimal jobid;//岗位ID
    @Transient
    private Integer status;//状态（1启用，0弃用）
    @Transient
    private TblRoleMySql  trole;
    //private TblOrganization tblOrganization;//组织ID
    @Transient
    private Integer outSideId; //标识用户来源 为null是本系统，1：蜂信，2,蜂信购买后的用户   3：华博云系统注册用户管理员  以后可能为2,3...来表示其它来源
    @Transient
    private String outSideOpenId; //外部同步企业来源Id
}
